// 部门相关接口
import request from '@/utils/request'

// 获取企业的部门列表
export const getDepartment = () => request({
  url: '/company/department'
})

// 根据ID删除部门
export const delDepartmentById = (id) => request({
  url: `/company/department/${id}`,
  method: 'delete'
})

// 获取员工简单列表
export const getEmployeeSimpleList = () => request({
  url: `/sys/user/simple`
})

// 新增部门
export const addDepartment = (data) => request({
  url: `/company/department`,
  method: 'post',
  data
})

// 根据ID查询部门详情
export const getDepartmentDetail = (id) => request({
  url: `/company/department/${id}`
})

// 根据ID修改部门详情
export const editDepartmentDetail = (data) => request({
  url: `/company/department/${data.id}`,
  method: 'put',
  data
})
